/*
 * command.h
 *
 *  Created on: Apr 27, 2013
 *      Author: Daniel
 */

// incoming general commands
#ifndef COMMAND_H_
#define COMMAND_H_

#define COMMAND_ROUTE			0b00000000		//	declares route
#define COMMAND_RETURN			0b00000001		//	returns immediately to docking station
#define COMMAND_ELAND			0b00000010  	//	attempts to land as quickly and safely as possible at the current position
#define COMMAND_STOP			0b00000100	  	//	stops and hovers at location
#define COMMAND_DOCKINGOFFSETS  0b00001000	  	//	AKA dock found
#define COMMAND_DOCKNOTFOUND    0b00010000		//	dock not detected
#define COMMAND_CONTROL			0b00010001		//	initiate remote control

// incoming control commands
#define COMMAND_CTRL_STOP		0b00000000		// stop and hover
#define COMMAND_CTRL_UP			0b00000001		// increase altitude
#define COMMAND_CTRL_DOWN		0b00000010		// decrease altitude
#define COMMAND_CTRL_CLKWS		0b00000100		// rotate clockwise
#define COMMAND_CTRL_ACLKWS		0000001000		// rotate anti-clockwise
#define COMMAND_CTRL_LEFT	  	0b00010000		// move left
#define COMMAND_CTRL_RIGHT	 	0b00100000		// move right
#define COMMAND_CTRL_BACK	  	0b01000000		// move backwards
#define COMMAND_CTRL_FORTH	  	0b10000000		// move forwards

// outgoing commands
#define COMMAND_FINDDOCK		0b00100000		//	vehicle asks the computer to locate the docking station on-camera
#define COMMAND_GPSUPDATE		0b01000000		//	vehicle is sending an update of its position
#define COMMAND_REFRESH_QUERY	0b10000000		//	vehicle wants to know if it should keep performing the command it last received
#define COMMAND_MESSAGE			0b11111110		//	sends a message to the computer terminal

#endif
